<template>
  <div id="app">
    <div class="item" v-for="item of detail" :key="item.id" >
          <img :src="item.coverImgUrl" alt="">
          <p>{{item.name}}</p>
      </div>
  </div>
</template>

<script>
import axios from 'axios';
export default {
  data(){
    return{
      detail:[]
    }
  },
  mounted(){
    console.log(this.$route.query);
    var id = this.$route.query;
    axios.get(`http://47.108.197.28:3000/top/playlist?id=${id}`).then(res=>{
      this.detail = res.data.playlists
    })
  }
}
</script>

<style scoped>
  #app{
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
    }
    .item{
        width: 150px;
        
    }
    img{
        width: 150px;
    }
</style>